package com.stu.provider.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.stu.common.entity.Student;
import com.stu.common.service.StudentService;
import com.stu.provider.mapper.StudentMapper;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service
public class StudentServiceImpl implements StudentService {
    @Autowired
    private StudentMapper studentMapper;

    @Override
    public List<Student> findAll() {
        return studentMapper.selectAll();
    }

    @Override
    public Student findById(Long id) {
        return studentMapper.selectById(id);
    }

    @Override
    public int modifyById(Student student) {
        return studentMapper.updateById(student);
    }
}
